/*
 * Mapper.h
 *
 *  Created on: 2011-8-14
 *      Author: ryan
 */

#ifndef MAPPER_H_
#define MAPPER_H_

#include "Scheduler.h"

typedef struct{
	void *key, *value;
	int keySize, valueSize;
}KEY_VALUE;

typedef struct{
	int num;
	KEY_VALUE *subtasks;
}TASK;

void splitTask(int, char*[], TASK*);
void map(KEY_VALUE*, KEY_VALUE*);
void reduce(KEY_VALUE*, KEY_VALUE*);

#endif /* MAPPER_H_ */
